import { Navigate } from 'react-router-dom'
import { lazy } from 'react'


//登录页面
const Login = lazy(() => import('../view/login'))
//主页
//const Main = lazy(() => import('../view/mian'))
//主页
const Main03 = lazy(() => import('../view/mian03'))
//看板页面
const Board = lazy(() => import('../view/board'))
//Test01
const Test01 = lazy(() => import('../view/test01'))
//Test01
const Test02 = lazy(() => import('../view/test02'))
//TestLoad
const TestLoad = lazy(() => import('../view/testLoad'))

const element = [
	//测试加载页面效果
	{
		path: 'testLoad',
		element: <TestLoad />
	},
	{
		path: 'login',
		element: <Login />
	},
	{
		path: 'main',
		element: <Main03 />,
		children: [
			{
				path: 'board',
				element: <Board />,
			},
			{
				path: 'test01',
				element: <Test01 />,
			},
			{
				path: 'test02',
				element: <Test02 />,
			},
			//严格模式，去掉缺省
			// {
			// 	path: '/main',
			// 	element: <Navigate to='board' />
			// },
		]
	},
	//严格模式，去掉缺省
	{
		path: '/',
		element: <Navigate to='login' />
	}
]


export default element;
